package com.shengzai.mapreduce.partioner;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Partitioner;

public class MyPartitioner extends Partitioner<Text,Student> {

    @Override
    public int getPartition(Text text, Student student, int i) {
        if(student.age>21)
            return 0;
        else if(student.age==21)
            return 1;
        else
            return 2;
    }
}